package transaction.imp;

import classification.PaymentClassification;
import classification.imp.CommissionedClassification;
import schedule.PaymentSchedule;
import schedule.imp.BlweeklySchedule;

public class AddCommissionEmployee extends AddEmployeeTransaction {
    private double commissionRate;
    private double monthlySalary;

    public AddCommissionEmployee(int empid, String name, String address, double monthlySalary, double commissionRate) {
        super(empid, name, address);
        this.monthlySalary = monthlySalary;
        this.commissionRate = commissionRate;
    }

    @Override
    public PaymentClassification getPaymentClassification() {
        return new CommissionedClassification(monthlySalary, commissionRate);
    }

    @Override
    public PaymentSchedule getPaymentSchedule() {
        return new BlweeklySchedule();
    }

    public double getCommissionRate() {
        return commissionRate;
    }

    public void setCommissionRate(double commissionRate) {
        this.commissionRate = commissionRate;
    }

    public double getMonthlySalary() {
        return monthlySalary;
    }

    public void setMonthlySalary(double monthlySalary) {
        this.monthlySalary = monthlySalary;
    }
}
